﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CanteenNotics.aspx.cs" Inherits="Business_Notics_CanteenNotics"
    Theme="normal" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>食堂公告</title>
    <link href="../../css/MessageTable.css" rel="stylesheet" type="text/css" />

    <%--<script type="text/javascript" src="../../js/MobileJS.js" />--%>
</head>
<body style="background-color: #fcf6ec">
    <form id="form1" runat="server" method="post">
        <asp:ScriptManager ID="Scriptmanager1" runat="server" EnableScriptGlobalization="true"
            EnableScriptLocalization="true">
            <Scripts>
                <asp:ScriptReference Path="../../js/MobileJS.js" />
            </Scripts>
        </asp:ScriptManager>
        <div>
            <div class="normalnav">
                <div class="normalcontent">
                    <span style="color: #ffffff">通知公告>>></span><span style="color: #f6ff00">食堂公告</span></div>
            </div>
            <table border="2" cellpadding="5" cellspacing="1" bordercolor="#edc789" style="width: 98%;
                text-align: center; background-color: #ffffff; border-collapse: collapse; margin-left: 10px;
                top: 40px; position: absolute;">
                <!--消息内容-->
                <tr>
                    <td align="right" style="width: 30%">
                        <span style="color: Red;">*</span>消息内容：</td>
                    <td style="width: 70%; text-align: left; border: 1px;" colspan="3">
                        <asp:TextBox ID="tb_MsgContent" runat="server" Width="250px" MaxLength="130" BorderWidth="1px"
                            Height="82px" TextMode="MultiLine" Text=""></asp:TextBox>
                        <asp:Label ID="lbl_MsgContent" runat="server">请输入公告内容</asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tb_MsgContent"
                            Display="Dynamic" ErrorMessage="发送公告内容不能为空！"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <!--添加手机号码-->
                <tr>
                    <td align="right" style="width: 30%">
                        <span style="color: Red; overflow: hidden;">*</span> <span style="overflow: hidden;">
                            添加手机号码：</span></td>
                    <td style="width: 200px; text-align: left; border-right: 0px;" colspan="2">
                        <asp:TextBox ID="tb_Mobile" runat="server" Width="250px" MaxLength="11" BorderWidth="1px"
                            Height="87px" TextMode="MultiLine"></asp:TextBox>
                    </td>
                    <td style="vertical-align: top; text-align: left; border-left: 0px;">
                        <asp:Label ID="lbl_Mobile" runat="server" Text="请添加手机号码，多个手机号码请用逗号分隔"></asp:Label>
                        <br />
                        <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="tb_Mobile"
                            Display="Dynamic" ErrorMessage="请至少选择或输入一个号码！"></asp:RequiredFieldValidator>--%>
                        <br />
                        <span id="spanforError"></span>
                    </td>
                </tr>
                <!--参与人-->
                <tr>
                    <td align="right" style="width: 30%; height: 150px;" valign="top">
                        <span style="color: Red;">*</span>参与人：</td>
                    <td style="width: 200px; text-align: left; border: 0px;" colspan="2">
                        <div style="display: inline;">
                            <asp:ListBox ID="ListBox1" runat="server" Width="252px" SelectionMode="Multiple"
                                Height="146px"></asp:ListBox>
                            <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                ErrorMessage="<span style='color:red;font-size:13px;'>请选择至少一个手机号码！</span>" 
                                Display="Dynamic" ControlToValidate="ListBox1"></asp:RequiredFieldValidator>--%>
                        </div>
                    </td>
                    <td style="border: 0px; text-align: left; vertical-align: top;">
                        <asp:CheckBox ID="cb_SelectAll" runat="server" Text="全选" />
                        <br />
                        <%--<asp:Button ID="btn_AddContact" runat="server" Text=" 添加联系人 " OnClick="btn_AddContact_Click"
                            CssClass="buttons" CausesValidation="false" />--%>
                        <asp:Button ID="btn_AddContact" runat="server" Text=" 添加联系人 " OnClick="btn_AddContact_Click"
                            CssClass="buttons" CausesValidation="false" />
                        <%--<asp:Button ID="btn_AddContact" runat="server" Text=" 添加联系人 "
                            CssClass="buttons" CausesValidation="false" />--%>
                        <br />
                    </td>
                </tr>
                <!--发送方式-->
                <tr>
                    <td align="right" style="width: 30%;" valign="top">
                        <span style="color: Red;">*</span>发送方式：</td>
                    <%--<td style="width: 70%; text-align: left;" colspan="3">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <asp:RadioButton ID="rb_Now" runat="server" Text="立即" GroupName="SendTime" AutoPostBack="true"
                                    OnCheckedChanged="rb_Now_CheckedChanged" Checked="true" />
                                <asp:RadioButton ID="rb_Timing" runat="server" Text="定时" GroupName="SendTime" OnCheckedChanged="rb_Timing_CheckedChanged"
                                    AutoPostBack="true" />
                                <div runat="server" visible="false" style="margin-left: 2px;" id="div_Timing">
                                    <asp:TextBox ID="tb_SendTime" Width="80px" runat="server"></asp:TextBox>
                                    <asp:ImageButton runat="Server" ID="ibtn_SendTime" ImageUrl="~/Images/Calendar_scheduleHS.png"
                                        CausesValidation="false" AlternateText="点击选择日期" />
                                    <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="tb_SendTime"
                                        Format="yyyy-MM-dd" PopupButtonID="ibtn_SendTime" />
                                    <asp:DropDownList ID="ddl_SendHour" runat="server">
                                    </asp:DropDownList>时
                                    <asp:DropDownList ID="ddl_SendMinite" runat="server">
                                    </asp:DropDownList>分
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ErrorMessage="<span style='color:red; font-size:13px'>发送日期格式不正确！</span>"
                                        ControlToValidate="tb_SendTime" Display="Dynamic" ValidationExpression="^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$"></asp:RegularExpressionValidator>
                                </div>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>--%>
                    <td style="width: 550px; text-align: left;" colspan="3">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <%--<asp:RadioButton ID="rb_Now" runat="server" Text="立即" GroupName="SendTime" AutoPostBack="true"
                                    OnCheckedChanged="rb_Now_CheckedChanged" Checked="true" />
                                <asp:RadioButton ID="rb_Timing" runat="server" Text="定时" GroupName="SendTime" OnCheckedChanged="rb_Timing_CheckedChanged"
                                    AutoPostBack="true" />--%>
                                <asp:RadioButton ID="rb_Now" runat="server" Text="立即" GroupName="SendTime" AutoPostBack="true"
                                    OnCheckedChanged="rb_Now_CheckedChanged" Checked="true" />
                                <asp:RadioButton ID="rb_Timing" runat="server" Text="定时" GroupName="SendTime" OnCheckedChanged="rb_Timing_CheckedChanged"
                                    AutoPostBack="true" />
                                <%--    
                                <asp:RadioButton ID="rb_Now" runat="server" Text="立即" GroupName="SendTime"  Checked="true" AutoPostBack="false"/>
                                <asp:RadioButton ID="rb_Timing" runat="server" Text="定时" GroupName="SendTime" AutoPostBack="false" />--%>
                                <asp:TextBox ID="tb_SendTime" Width="80px" runat="server"></asp:TextBox>
                                <asp:ImageButton runat="Server" ID="ibtn_SendTime" ImageUrl="~/Images/Calendar_scheduleHS.png"
                                    CausesValidation="false" AlternateText="点击选择日期" />
                                <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="tb_SendTime"
                                    Format="yyyy-MM-dd" PopupButtonID="ibtn_SendTime" />
                                <asp:DropDownList ID="ddl_SendHour" runat="server">
                                </asp:DropDownList>时
                                <asp:DropDownList ID="ddl_SendMinite" runat="server">
                                </asp:DropDownList>分
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ErrorMessage="<span style='color:red; font-size:13px; font-weight:bold;'>发送日期格式不正确！</span>"
                                    ControlToValidate="tb_SendTime" Display="Dynamic" ValidationExpression="^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$">
                                </asp:RegularExpressionValidator>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                </tr>
                <tr>
                    <td align="left" class="navi_link" colspan="4">
                        <input type="image" name="submit" id="submit" src="../../Images/Basic/tianjia.gif"
                            onserverclick="btnSave_Click" runat="server" />发送
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
